<?php

class CustomReportAdmin extends LeftAndMainExtension {
	private static $allowed_actions = array(
		'doPrint'
	);
	
	public function init() {
		Requirements::css('site/css/CustomReportAdmin.css');
		Requirements::javascript('site/javascript/CustomReportAdmin.js');
	}
	
	public function doPrint($request){
		if($order = OrderPackage::get()->byID((int)$request->getVar('id'))){
			return $order->ViewPrint();
		}
		
		return $this->owner->httpError('404');
	}
}
